﻿@{
    ViewBag.Title = "Home";
    Layout = "~/Views/Share/_Layout.cshtml";
}

@section scripts{
    <script src="~/Content/grid/src/noke.grid.js"></script>
    
    <script>
        $(function () {
            BindData();
            BindDataSystemGrid();
        });
        function GridSetting() {

            var setting = { id: "UpdateLogGrid", key: "ID", title: {}, cols: [], toolbar: {}, rowindex: false, data: [], rowbind: null };
            setting.cols.push({ key: "Summary", type: "string", width: 80, label: "Summary" });
            setting.cols.push({ key: "Time", type: "string", width: 80, label: "Time" });
            setting.cols.push({ key: "Author", type: "string", width: 60, label: "Author" });

            return setting;
        }

        function GridSettingSystemGrid() {

            var setting = { id: "SystemGrid", key: "ID", title: {}, cols: [], toolbar: {}, rowindex: false, data: [], rowbind: null };
            setting.cols.push({ key: "Summary", type: "string", width: 80, label: "Summary" });
            setting.cols.push({ key: "Url", type: "string", width: 80, label: "Url" });
            setting.cols.push({ key: "User", type: "string", width: 80, label: "Account" });
            setting.cols.push({ key: "Password", type: "string", width: 80, label: "Password" });

            return setting;
        }

        function BindData() {
            var data = [];
            data.push({ Summary: '本站点源码 <a href="https://git.oschina.net/iracer/BenlaiStudy.git" target="_blank">下载地址</a>', Time: '2016-04-20', Author: 'yanggenshui' });
            data.push({ Summary: '简单实现一个基于TCP的SOA框架源码 <a href="https://git.oschina.net/iracer/NokeSOA.git" target="_blank">下载地址</a>', Time: '2016-04-20', Author: 'yanggenshui' });
            data.push({ Summary: 'INSPINIA <a href="http://www.jq22.com/demo/web20160509/typography.html" target="_blank">访问</a>', Time: '2016-06-24', Author: '***' });
            data.push({ Summary: 'jqTree官网 <a href="https://mbraak.github.io/jqTree/" target="_blank">访问</a>', Time: '2016-05-05', Author: '***' });
            var setting = GridSetting();
            setting.data = data;
            $('#UpdateLogGrid').grid(setting);
        }
        function BindDataSystemGrid() {
            var data = [];
            data.push({ Summary: 'Benlai OA', Url: '<a href="http://oa.benlai.com/login/Login.jsp" target="_blank">审批申请</a>', User: '', Password: '' });
            data.push({ Summary: 'redmine', Url: '<a href="http://pm.benlai.net:8080/redmine" target="_blank">redmine</a>', User: '', Password: '' });
            data.push({ Summary: '权限资源控制工具', Url: '<a href="http://backstage.benlai.com/resources/Tools/PrivilegeResourceTools.aspx" target="_blank">权限资源控制工具</a>', User: '', Password: '' });
            data.push({ Summary: '数据库数据字典', Url: '<a href="http://192.168.60.210:23000/" target="_blank">数据库数据字典</a>', User: 'visitor', Password: 'cc.123' });
            data.push({ Summary: '测试机 FTP', Url: 'ftp://192.168.60.241/', User: 'yanggenshui', Password: 'benlai.com@2014' });
            data.push({ Summary: 'ECharts 图表', Url: '<a href="http://echarts.baidu.com/echarts2/doc/example.html?qq-pf-to=pcqq.c2c" target="_blank">ECharts</a>', User: '', Password: '' });
            data.push({ Summary: '本来第三方平台测试', Url: '<a href="http://localhost:8000/" target="_blank">Go</a>', User: '', Password: '' });
            data.push({ Summary: '本来办公室Wifi', Url: '', User: 'Benlei-Office', Password: 'livebenlei@2016' });
            data.push({ Summary: '本来ERP', Url: '<a href="http://backstage.benlai.com/" target="_blank">Go</a>', User: '', Password: '' });
            data.push({ Summary: '本来任务调度平台', Url: '<a href="http://test.taskmanager.benali.test.com/" target="_blank">Go</a>', User: '', Password: '' });
            data.push({ Summary: '测试机发版平台', Url: '<a href="http://192.168.60.51/view/Backstage/" target="_blank">Go</a>', User: '', Password: '' });
            var setting = GridSettingSystemGrid();
            setting.data = data;
            $('#SystemGrid').grid(setting);
        }
    </script>
   
}

@section head{
        
        <div class="col-sm-4">
            <ol class="breadcrumb">
                <li>
                    <a href="/">Home</a>
                </li>
                <li class="active">
                    <strong>常用链接</strong>
                </li>
            </ol>
        </div>

}

<div class="row">

    <div class="col-lg-6">
        <div class="panel panel-default">
          <div class="panel-heading">本来系统</div>
          <div class="panel-body">
            <div id="SystemGrid"></div>
          </div>
        </div>
    </div>
    <div class="col-lg-6">
        <div class="panel panel-default">
          <div class="panel-heading">更新日志</div>
          <div class="panel-body">
            <div id="UpdateLogGrid"></div>
          </div>
        </div>
    </div>
    <!-- /.col-lg-12 -->
    <div class="col-lg-6">
    </div>
    <!-- /.col-lg-12 -->
</div>
<!-- /.row -->
